Optimal. Leaf size=119 \[ \frac {\left (a^2+3 b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {3 \left (a^2+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (3 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \sec ^8(c+d x)}{4 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3506, 696, 1810} \[ \frac {\left (a^2+3 b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {3 \left (a^2+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (3 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \sec ^8(c+d x)}{4 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 696
Rule 1810
Rule 3506
Rubi steps
\begin {align*} \int \sec ^8(c+d x) (a+b \tan (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int (a+x)^2 \left (1+\frac {x^2}{b^2}\right )^3 \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^8(c+d x)}{4 d}+\frac {\operatorname {Subst}\left (\int \left (1+\frac {x^2}{b^2}\right )^3 \left (-2 a x+(a+x)^2\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^8(c+d x)}{4 d}+\frac {\operatorname {Subst}\left (\int \left (a^2+\frac {\left (3 a^2+b^2\right ) x^2}{b^2}+\frac {3 \left (a^2+b^2\right ) x^4}{b^4}+\frac {\left (a^2+3 b^2\right ) x^6}{b^6}+\frac {x^8}{b^6}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^8(c+d x)}{4 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {\left (3 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {3 \left (a^2+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (a^2+3 b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.58, size = 133, normalized size = 1.12 \[ \frac {\tan (c+d x) \left (180 \left (a^2+3 b^2\right ) \tan ^6(c+d x)+756 \left (a^2+b^2\right ) \tan ^4(c+d x)+420 \left (3 a^2+b^2\right ) \tan ^2(c+d x)+1260 a^2+315 a b \tan ^7(c+d x)+1260 a b \tan ^5(c+d x)+1890 a b \tan ^3(c+d x)+1260 a b \tan (c+d x)+140 b^2 \tan ^8(c+d x)\right )}{1260 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 122, normalized size = 1.03 \[ \frac {315 \, a b \cos \left (d x + c\right ) + 4 \, {\left (16 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{8} + 8 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 6 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 5 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 35 \, b^{2}\right )} \sin \left (d x + c\right )}{1260 \, d \cos \left (d x + c\right )^{9}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.82, size = 156, normalized size = 1.31 \[ \frac {140 \, b^{2} \tan \left (d x + c\right )^{9} + 315 \, a b \tan \left (d x + c\right )^{8} + 180 \, a^{2} \tan \left (d x + c\right )^{7} + 540 \, b^{2} \tan \left (d x + c\right )^{7} + 1260 \, a b \tan \left (d x + c\right )^{6} + 756 \, a^{2} \tan \left (d x + c\right )^{5} + 756 \, b^{2} \tan \left (d x + c\right )^{5} + 1890 \, a b \tan \left (d x + c\right )^{4} + 1260 \, a^{2} \tan \left (d x + c\right )^{3} + 420 \, b^{2} \tan \left (d x + c\right )^{3} + 1260 \, a b \tan \left (d x + c\right )^{2} + 1260 \, a^{2} \tan \left (d x + c\right )}{1260 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.41, size = 138, normalized size = 1.16 \[ \frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {a b}{4 \cos \left (d x +c \right )^{8}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{21 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{5}}+\frac {16 \left (\sin ^{3}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{3}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 133, normalized size = 1.12 \[ \frac {140 \, b^{2} \tan \left (d x + c\right )^{9} + 315 \, a b \tan \left (d x + c\right )^{8} + 1260 \, a b \tan \left (d x + c\right )^{6} + 180 \, {\left (a^{2} + 3 \, b^{2}\right )} \tan \left (d x + c\right )^{7} + 1890 \, a b \tan \left (d x + c\right )^{4} + 756 \, {\left (a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{5} + 1260 \, a b \tan \left (d x + c\right )^{2} + 420 \, {\left (3 \, a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{3} + 1260 \, a^{2} \tan \left (d x + c\right )}{1260 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.68, size = 132, normalized size = 1.11 \[ \frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a^2+\frac {b^2}{3}\right )+a^2\,\mathrm {tan}\left (c+d\,x\right )+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {3\,a^2}{5}+\frac {3\,b^2}{5}\right )+{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (\frac {a^2}{7}+\frac {3\,b^2}{7}\right )+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9}+a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^2+\frac {3\,a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^4}{2}+a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^6+\frac {a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^8}{4}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \sec ^{8}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________